-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make const_eval_select
a real intrinsic
#100759
Make const_eval_select
a real intrinsic
#100759
Conversation
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
79eca84
to
7aa26a1
Compare
Another possible implementation plan would be to exploit that we have separate MIR for CTFE and runtime, and implement the intrinsic via lowering to a regular function call some place in the MIR pipeline. That would make supporting |
Yes, but AFAIK there is no separate query for runtime-only MIR, right? Implementing it that way would require adding such a query and rewiring runtime MIR usage to that. |
The optimized_mir query is only used for runtime MIR, I think. But maybe that changed again. The hierarchy of MIR queries is historically an underdocumented mess, not sure if it improved over the last year. But I am pretty sure that there is a fork in the road somewhere for MIR (where it becomes CTFE/runtime only), and we should be able to use that here. |
Yeah looks like |
It is kind of a crude hack to have 'implementation' passes in optimized_mir, but it might be the best solution for this particular intrinsic. |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, I like this variant of doing it on the MIR
651e0b0
to
0d03c62
Compare
@bors r+ |
📌 Commit 0d03c6273e96b843d88afb14fd68d4310a6e29c3 has been approved by It is now in the queue for this repository. |
@bors r- There was a test that changed to a no-op when I was debugging. I need to fix that |
cf3fc5a
to
89ebd65
Compare
☔ The latest upstream changes (presumably #101396) made this pull request unmergeable. Please resolve the merge conflicts. |
89ebd65
to
e87f7e3
Compare
@bors delegate+
|
✌️ @fee1-dead can now approve this pull request |
e87f7e3
to
65b685e
Compare
@bors r=oli-obk,RalfJung |
☀️ Test successful - checks-actions |
Finished benchmarking commit (9358d09): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
Visiting for weekly performance triage. Many of the reported regressions are being classified as noise from recently arising bimodalities in certain benchmarks. But, the regression to ripgrep does look like it might be legitimate, at least from skimming its graph and zooming in. Not marking as triaged, not yet. |
ripgrep only regressed in LLVM, a bit later it got improved (in llvm) by a targetted placement of |
This fixes issues where
track_caller
functions do not have nice panicmessages anymore when there is a call to the function, and uses the
MIR system to replace the call instead of dispatching via lang items.
Fixes #100696.